<!DOCTYPE HTML>
<html>
	<head>
		<title>活期存蓄计算器</title>
		<meta name="Generator" content="EditPlus">
		<meta name="Author" content="余应强">
		<meta name="Keywords" content="细缆页面">
		<meta name="Description" content="">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="images/jquery5.js"></script>
		<script type="text/javascript" src="images/nav.js"></script>
		<link href="images/css.css" rel="stylesheet" type="text/css">
        <link href="images/page.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="images/main_menu.css" type="text/css" />
        <LINK rel="Shortcut Icon" type=image/x-icon href="images/favicon.ico" mce_href="images/favicon.ico">
         <LINK rel=Bookmark type=image/x-icon href="images/favicon.ico" mce_href="images/favicon.ico">
<SCRIPT language=javascript src="images/wincontrol.js"></SCRIPT>
<SCRIPT language=javascript src="images/Calendar.js"></SCRIPT>
<SCRIPT language=javascript src="images/Calculator.js"></SCRIPT>
<SCRIPT language=javascript src="images/WBselect.js"></SCRIPT>
<SCRIPT language=javascript src="images/GetRate.js"></SCRIPT>
<SCRIPT language=javascript src="images/Components.js"></SCRIPT>
<SCRIPT language=javascript src="images/CheckDataFunction.js"></SCRIPT>
<SCRIPT language=javascript  src="images/CalcActiveSave.js"></SCRIPT>
<style type="text/css" >
#Table1 TD, #Table2 TD{
	border-left:none;
	border-right:none;
	border-top:none;
	border-bottom:#FC6  1px dashed;
	height:27px;
    
	}
	.submit{
		background-image: url(images/menu_item_sel_bg.jpg)  ; background-repeat:repeat-x ; background-position:left
		width:35px; border-color:#FF3;}
</style>
	</head>
	<body>
    
    <!--头部模板开始-->
    
		<TRS_TEMPLATE TEMPNAME="top"></TRS_TEMPLATE>
        
	<!--头部模板结束-->     
		<!--主体部分-->
	  <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr><td colspan="1">当前位置：<TRS_CURPAGE HOMEPAGEDESC="首页" ONLY="FALSE" AUTOLINK="TRUE" TARGET="_self" VALUE=">"></TRS_CURPAGE><td></tr>
         
			<tr>
				<td width="700" height="400" valign="top"><TABLE width=556 height="493"  border="2"  align="center" cellPadding=0 cellSpacing=0  bordercolor="#FFFF66"   style="margin-top:60px;">
        
        
        <TR>
          <TD width="536" height="493">
         
         <h1>活期储蓄计算器 </h1>
         <div style="margin-bottom:5px; padding:5px; color: #336699">
            <DIV><font size="+1" > 活期储蓄计算器</font></DIV>
            <DIV style="font-size:14px">活期储蓄是客户家庭持有现金的一种常用方式。通过本计算器，可以计算出活期储蓄的实得本息总额（已扣除利息税）和提取日期。</DIV>
            </div>
            <FORM id=CompPartSumCalc name=CompPartSumCalc>
            <TABLE width=483 height="208"  align=center 
            cellPadding=1 
             cellSpacing=1 id=Table1 style="HEIGHT: 164px;border:  #FF9 double 2px; border-bottom:none;  margin-top:25px;">
              <TBODY>
              <TR>
                <TD height=22 width=92 align=left>计算项目</TD>
                <TD height=22 colSpan=4><INPUT id=CalcType_1 
                  language=javascript onclick=typechange() value=on type=radio 
                  name=CalcType>实得本息总额 <INPUT id=CalcType_2 language=javascript 
                  onclick=typechange() value=on type=radio 
              name=CalcType>提取日期</TD></TR>
              <TR>
                <TD height=22 align=left >存入日期</TD>
                <TD height=22 width=203><INPUT onblur=ChkCZDate(beginDateID) 
                  style="WIDTH: 85px" id=beginDateID class=txt value=2001-1-1 
                  name=beginDate><IMG style="CURSOR: hand" 
                  onclick=javascript:Cal_dropdown(beginDateID) alt="" 
                  align=absMiddle src="images/Calendar1.gif"></TD></TR>
              <TR>
                <TD height=22 width=92 align=left>存入金额(元)</TD>
                <TD height=22 width=203><FONT face=宋体><INPUT 
                  style="WIDTH: 80px" id=edSaveSum class=txtnum 
                  name=edSaveSum></FONT></TD>
                <TD width="174" colSpan=2><INPUT style="WIDTH: 63px; HEIGHT: 20px" id=btnSaveIn  title=可以录入多笔存款 value="确定存入" type=button name=Button1 class="submit"></TD></TR>
              <TR>
                <TD height=96 colSpan=4 align=middle>
                  <DIV style="WIDTH: 300px;" class=scdiv 
                  align=center>
                  <TABLE style="TEXT-ALIGN: center; margin-bottom:5px;" id=TableView border=0 
                  cellSpacing=0 cellPadding=1 width=300>
                    <TBODY>
                    <TR  style="background:url(images/items_bg.jpg)">
                      <TD   width=148  style="border-bottom:none; height:15px;"><FONT 
                      face=宋体>存入日期</FONT></TD>
                      <TD style="border-bottom:none"><FONT 
                    face=宋体>存入金额(元)</FONT></TD></TR></TBODY></TABLE>
                    </DIV>
                  <table border=0 width=459 align=center style="border-bottom:none;">
                    <tbody>
                      <tr>
                        <td height=22 align=left><font face=宋体>年利率(%)</font></td>
                        <td height=22 align=left><input style="WIDTH: 110px" 
                  id=edFullRate class=txtnum name=edFullRate></td>
                      </tr>
                      <tr>
                        <td id=lbTQRQ height=22 width=110 align=left style="border-bottom:none;">提取日期</td>
                        <td id=TQRQ height=22 width=174 style="border-bottom:none;"><input 
                  onBlur=ChkCZDate(endDateID) style="WIDTH: 85px" id=endDateID 
                  class=txt value=2001-1-1 name=endDateID>
                          <img 
                  style="CURSOR: hand" id=ddimg 
                  onClick=javascript:Cal_dropdown(endDateID) alt="" 
                  align=absMiddle src="images/Calendar1.gif"></td>
                        <td width="161" align="left" style="border-bottom:none;"><input style="WIDTH: 63px; HEIGHT: 20px" id=btnCalc  class="submit" value=" 计算" type=button name=btnCalc></td>
                      </tr>
                    </tbody>
                  </table></TD></TR></TABLE>
      <hr color="#FFFF66" size="1" width="90%" style="margin:15px 0 15px 0;">
     
            <TABLE id=Table2 border=0  align=center>
              <TBODY>
            
              <TR>
                <TD id=lbSDBX height=22 width=169>实得本息总额(元)</TD>
                <TD id=SDBX width=175><INPUT style="WIDTH: 112px" id=edFullSum 
                  class=txtd  name=edFullSum></TD></TR>
              <TR>
                <TD height=22>存入本金总额(元)</TD>
                <TD><INPUT style="WIDTH: 112px" id=edSaveTotal class=txtd 
                   name=edSaveTotal></TD></TR><!--
            <tr>
                <td height="22">扣除利息税金额(元)</td>
                <td><font face="宋体"><input class="txtd" id="edTaxSum" style="width: 112px" name="edTaxSum" value="计算得出" type="text"> </font></td>
            </tr>--></TBODY></TABLE></FORM>
            <SCRIPT language=javascript>
function ChkCZDate(edit)
{edit.value=Trim(edit.value);if(edit.value=='') return true;if(!Cal_datevalid(edit,'1910-1-1','3000-1-1')) 
{alert('日期格式不正确,日期有效范围为1910年到3000年');
edit.focus();}
 }</SCRIPT>

            <SCRIPT language=javascript>
<!--
	var startdate =  new Array('2002-2-21');
	var activerate;
	var savedatearray =  new Array();
	var savesumarray =  new Array();
	function GetTotalSaveSum() // 获取用户点击"确定存入"向表格中添加的总共存入金额
	{
		var i;
		var s = new Number(0);
		for ( i = 0; i < savesumarray.length; i++ )
		{
			s += new Number(savesumarray[i]);
		}
		return s;
	}
		// -->
		</SCRIPT>

            <SCRIPT language=javascript 
            src="images/CheckDataFunction.js"></SCRIPT>

            <SCRIPT language=javascript for=btnSaveIn event=onclick>
			//在存入之前，初始存入日期非空且大于等于1999-11-1，金额也要合法
			if (!CheckEmpty(beginDateID,"无效的初始存入日期"))
					{return false;	}
			if ( Cal_strtodate(beginDateID.value)< Cal_strtodate("1999-11-1") )  
			{
					DispMessage(beginDateID,"初始存入日期不得小于1999年11月1日");
					return false;
			}									
			if (!CheckFN3(edSaveSum,"存人金额请输入正数",false))				 
					return false;			
			savedatearray.push(beginDateID.value);		
			savesumarray.push(edSaveSum.value);		
			
			InsertRecord(beginDateID.value,edSaveSum.value);			
			edSaveSum.value="";
			beginDateID.select();
			beginDateID.focus();
		</SCRIPT>

            <SCRIPT language=javascript for=btnCalc event=onclick>						
			if (savedatearray.length==0) //如果数组中存入有数据，则不校验这两项(点存人按钮时校验了)
			{
				if (!CheckEmpty(beginDateID,"无效的初始存入日期"))
					return false;	
				
				if ( Cal_strtodate(beginDateID.value)< Cal_strtodate("1999-11-1")  )
				{
					DispMessage(beginDateID,"初始存入日期不得小于1999年11月1日");
					return false;
				}									
				if (!CheckFN3(edSaveSum,"存人金额请输入正数",false))
						return false;			
			}	
			else
			{
			 if (document.all.CalcType_1.checked==true) //计算选项不是计算日期时，校验
				for (var i=0; i<savedatearray.length;i++)
				{
					if ( Cal_strtodate(endDateID.value)<=Cal_strtodate(savedatearray[i]))
					{
						DispMessage(endDateID,"你存入的初始存入日期大于或等于提取日期,请修改");
						return false;
					}	
				}		
			}			
				
				if (document.all.CalcType_1.checked==true)
				 {
					if (!CheckEmpty(endDateID,"无效的提取日期"))
						return false;	
					if (savedatearray.length==0)
						if ( Cal_strtodate(beginDateID.value)>=Cal_strtodate(endDateID.value)&& (document.all.CalcType_1.checked==true) )
						{
							DispMessage(endDateID,"初始存入日期不得大于或等于提取日期");
							return false;
						}						
				 }					 
				if (!CheckFN3(edFullRate,"年利率请输入正数",false))				 
						return false;			
				if (document.all.CalcType_2.checked==true)
				{
					if (!CheckFN3(edFullSum,"实得本息总额请输入正数",false))
						return false;
					if (GetTotalSaveSum() > parseFloat(edFullSum.value))
					{
						DispMessage(edFullSum, "实得本息总额应大于等于存入金额（之和）！");
						return false;
					}
				}
				if (document.all.CalcType_1.checked==true)
					computefullsum(document);										
		    	 else
					computeoutdate(document);
				document.all.edTaxSum.value=Round((parseFloat(document.all.edFullSum.value)-parseFloat(document.all.edSaveTotal.value))/4);				  	
				DeleteAll();
				
		</SCRIPT>

            <SCRIPT language=javascript>
		function typechange()
		{
			calctypechange();
			DeleteAll();
		}	
		</SCRIPT>

            <SCRIPT language=javascript>
			
			function getmaxsavedate()
			{
				var result=savedatearray[0];
				for (var i=0; i<savedatearray.length;i++)
				{
				 if (i<savedatearray.length-1)
					if ( Cal_strtodate(result)<Cal_strtodate(savedatearray[i+1]))
						result=savedatearray[i+1];
				}		
				return result;		
			}

			function InsertRecord(date,sum)
			{
				var tr=document.all.TableView.insertRow();
				var td1=tr.insertCell();
				td1.innerText=date;
				var td2=tr.insertCell();
				td2.innerText=sum;
			}
			
			function DeleteAll()
			{
				savesumarray.splice(0,savesumarray.length);
				savedatearray.splice(0,savedatearray.length);								
				len=document.all.TableView.rows.length;	
				if (len>1)
				for (var i=1; i<len;i++)
				{				
						document.all.TableView.deleteRow(1);
				}
			}
		
			function changeobject(objectid)
			{
			  	    var ss1=document.all.TQRQ.innerHTML;
				    var ss2=document.all.SDBX.innerHTML;
				    
				    if (ss1.indexOf(objectid)>0)
				    {
				         ls=document.all.lbTQRQ.innerHTML;
				        document.all.lbTQRQ.innerHTML=document.all.lbSDBX.innerHTML;
    				    document.all.lbSDBX.innerHTML=ls;
    				    
    				    document.all.TQRQ.innerHTML=document.all.SDBX.innerHTML;
    				    document.all.SDBX.innerHTML=ss1;
    			    }   
			}
		
			function calctypechange()
			{
					document.all.edFullSum.value="";
					document.all.edFullSum.className="txtnum";
					document.all.edFullSum.disabled=false;
					if (document.all.endDateID.value=="计算得出") 
					{
						var SaveDate=new Date();
						document.all.endDateID.value=SaveDate.getFullYear()+"-"+(SaveDate.getMonth()+1)+"-"+SaveDate.getDate();
					 }
					document.all.endDateID.disabled=false;
					
					if (document.all.CalcType_1.checked==true)
					{
					    changeobject("edFullSum");
					    document.all.ddimg.disabled=false;
						document.all.edFullSum.value="计算得出";
						document.all.edFullSum.className="txtd";
						document.all.edFullSum.disabled=true;
					}
					else
					{
					    changeobject("endDateID");
					    document.all.ddimg.disabled=true;
						document.all.endDateID.value="计算得出";
						document.all.endDateID.disabled=true;
						document.all.edFullRate.value=document.all.edFullRate.value=NBround(activerate[activerate.length-2]*100,4); //最新利率,叔祖结束标志-1。
					}
					document.all.edSaveTotal.value="计算得出";
					document.all.edTaxSum.value="计算得出";					
			}
			
			function loadinit()
			{
				activerate =  new Array(GetRMBSaveRatio("1","0",window.xmlRMBSaveRate.XMLDocument)/100,-1);
				calctypechange();		
				document.all.edSaveTotal.disabled=true;
				document.all.edTaxSum.disabled=true;
				dpAdvDateBlur();				
			} 
			
			function locaterate(sdate)
			{			 
			 for (var i=0; i<startdate.length;i++)
			  if ( sdate>=Cal_strtodate(startdate[i]))
			  {
			    if ( (i<startdate.length-1)&&(sdate<Cal_strtodate(startdate[i+1])) )
					return activerate[i];
				else if (i==startdate.length-1)	
					 return activerate[i];
			  }  
				return null;
			}
			
			function dpAdvDateBlur()
			{			   
				if (Trim(document.all.endDateID.value)!="")
				{				    
					var arate=locaterate(Cal_strtodate(document.all.endDateID.value));
					if (arate!=null)
					 {					 
						document.all.edFullRate.value=Round(arate*100,4); //回显时，年利率要乘100
					 }
				}
			}
		</SCRIPT>

            <SCRIPT language=javascript>
document.CompPartSumCalc.beginDateID.value=datetostring(new Date());
document.CompPartSumCalc.endDateID.value=datetostring(new Date());
var Savelist="";		
		  //GetCalc_Close();
		
		</SCRIPT>
<xml id=xmlRMBSaveRate ondatasetcomplete=loadinit() src="../../Data/200811/t20081117_130519.xml"></xml>
            <P></P>
<UL></UL></TD></TR></TBODY></TABLE>
				  
				</td>
				<td width="299" valign="top" rowspan="3" style="margin-top:-20px;">
				
                <TRS_TEMPLATE TEMPNAME="right">右部模板</TRS_TEMPLATE>
				</td>
			
			</tr>
		</table>
		<!--主体部分结束-->
		<!--网页底部-->
		<TRS_TEMPLATE TEMPNAME="bottom"></TRS_TEMPLATE>
		<!--网页底部结束-->
	</body>
</html>